<?php
namespace app\admin\model;
use app\admin\BaseModel;
use think\model\concern\SoftDelete;

class Brand extends BaseModel
{
    use SoftDelete;
    protected $pk='brand_id';
    public static function getBrandList($where,$whereOr)
    {
        $list_brandList=Brand::order("sort_order")
            ->where(function ($query)use ($whereOr){
                $query->whereOr($whereOr);
            })
            ->where($where)
            ->order("brand_id desc")
            ->paginate([
                'list_rows' => 5,//每页数量
                'query' => request()->param(),
            ]);
        $page = $list_brandList->render();
        return [$list_brandList,$page];
    }
}